package goshp

import (
	"fmt"
	"math"
	)


func (p *Point) IsValid() bool {
	return true
}

func (p *Point) Serialize() []byte {
	s := make([]byte, 0, 20)
	shapeType := Int32bytes(POLYGON)
	x := Uint64bytes(math.Float64bits(p.X))
	y := Uint64bytes(math.Float64bits(p.Y))
		
	s = Append(s, shapeType)
	s = Append(s, x)
	s = Append(s, y)	
		
	return s
}

func (p *Point) String() string {
	return fmt.Sprintf("x:%f y:%f", p.X, p.Y)
}
